# Author: KangLin(kl222@126.com)

#.rst:
# LunarCalendar
# --------
#
# Find LunarCalendar
#
# Find the LunarCalendar libraries (asound)
#
# ::
#
#   This module defines the following variables:
#      LunarCalendar_FOUND          - True if LunarCalendar libraries are found
#      LunarCalendar_LIBRARIES      - Set when LunarCalendar libraries is found
#      LunarCalendar_INCLUDE_DIRS   - where to find LunarCalendar heard directory.
#      LunarCalendar_DEFINITIONS    - Set definitions
#      LunarCalendar_VERSION_STRING - the version of LunarCalendar found (since CMake 2.8.8)

set(LunarCalendar_VERSION_STRING @BUILD_VERSION@)

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
	pkg_check_modules(LunarCalendar LunarCalendar)
    if(LunarCalendar_FOUND)
        return()
    endif()
endif()

# Compute and install package configuration and version files
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_prefix "${_dir}" ABSOLUTE)

find_path(LunarCalendar_INCLUDE_DIR LunarCalendar.h
    HINTS ${_prefix}
    PATH_SUFFIXES include/LunarCalendar)
find_library(LunarCalendar_LIBRARY LunarCalendar
    HINTS ${_prefix}
    PATH_SUFFIXES lib)

find_package_handle_standard_args(LunarCalendar
    REQUIRED_VARS LunarCalendar_INCLUDE_DIR
                  LunarCalendar_LIBRARY
    VERSION_VAR   LunarCalendar_VERSION_STRING)

if(LunarCalendar_FOUND)
	SET(LunarCalendar_INCLUDE_DIRS ${LunarCalendar_INCLUDE_DIR})
	SET(LunarCalendar_LIBRARIES ${LunarCalendar_LIBRARY})
endif()

MARK_AS_ADVANCED(LunarCalendar_INCLUDE_DIR LunarCalendar_LIBRARY)

